<ion-header>
    <ion-navbar>
        <ion-title>排行榜</ion-title>
    </ion-navbar>
</ion-header>

<ion-content id="rank">
    <div padding>
        <ion-segment [(ngModel)]="selectGameId" color="dark">
            <ion-segment-button [value]="game.id" *ngFor="let game of games" (click)="getRank(game.id)">
                {{game.name}}
            </ion-segment-button>
        </ion-segment>
    </div>
    <ion-list inset class="game_list">
        <ion-item *ngFor="let item of rank; let i = index" (click)="pushStatistics(item.id)">
            <ion-icon color="primary" item-start>{{ i + 1}}</ion-icon>
            <ion-avatar class="user-icon" item-start [innerHTML]="item.icon" color="white">
            </ion-avatar>
            <h2>{{item.user_name}}</h2>
            <button ion-button item-end outline clear icon-end>综合得分：{{item.score}}</button>
        </ion-item>
    </ion-list>

</ion-content>